import { createRouter, createWebHistory } from 'vue-router'
import BaseLayout from '@/layout/BaseLayout.vue'
import Growth from '@/views/Growth.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: BaseLayout,
      children: [
        {
          name: 'growth',
          path: 'growth',
          meta: {
            title: '成长'
          },
          component: Growth
        }
      ]
    },
    {
      path: '/:pathMatch(.*)*',
      redirect: '/growth'
    }
  ]
})

export default router
